<template>
  <el-dialog :title="title" :close-on-click-modal="false" :fullscreen="true" :visible.sync="visible"
    :before-close="cancel" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="50%">

    <div class="block">
    <el-timeline>
    <el-timeline-item timestamp="报告资料" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="8">
          <el-form-item label="报告单号" class="required" prop="fbillno">
            <el-input v-model="dataForm.fbillno" disabled/>
          </el-form-item>
        </el-col>

        <el-col :span="8">
          <el-form-item label="报告日期" class="required" prop="forddate" >
            <el-date-picker
              v-model="dataForm.forddate"
              type="date"
              placeholder="选择日期" >
              </el-date-picker>
          </el-form-item>
          </el-col>

          <el-col :span="8">
          <el-form-item label="报告状态" class="required" prop="forduser" >
            <el-select v-model="dataForm.fbillstate" placeholder="请选择" >
              <el-option
                v-for="item in getListSpeakerId"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>

        <el-col :span="8">
            <el-form-item label="实验人员" class="required" prop="frecuser" >
              <el-select v-model="dataForm.frecuser" placeholder="请选择" >
                <el-option
                  v-for="item in getListSpeakerId"
                  :key="item.id"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>

        <el-col :span="8">
          <el-form-item label="委托单位" class="required" prop="forduser" >
            <el-select v-model="dataForm.forduser" placeholder="请选择" >
              <el-option
                v-for="item in getListSpeakerId"
                :key="item.value"
                :label="item.label"
                :value="item.value">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>

          <el-col :span="8">
            <el-form-item label="委托单号" class="required" prop="fsrcno">
              <el-input v-model="dataForm.fsrcno" />
            </el-form-item>
          </el-col>


          <el-col :span="8">
            <el-form-item label="样品名称">
              <el-input v-model="dataForm.fcatname"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="样品标签">
              <el-input v-model="dataForm.fcatno"/>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="化验报告">
                <el-input v-model="dataForm.freportuser"/>
            </el-form-item>
          </el-col>

        </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="化验报告" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="16">
            <el-form-item label="报告内容" prop="FNOTE">
              <el-input
                type="textarea"
                :rows="8"
                placeholder="请输入内容"
                v-model="textarea1">
              </el-input>
            </el-form-item>
          </el-col>

        
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="核对说明" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="16">
            <el-form-item label="核对内容" prop="FNOTE">
              <el-input
                type="textarea"
                :rows="3"
                placeholder="请输入内容"
                v-model="textarea2">
              </el-input>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="核对结果">
              <el-select v-model="dataForm.FBILLSTATE" placeholder="请选择">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

    <el-timeline-item timestamp="审核说明" placement="top">
      <el-card>
        <el-row class="JNPF-common-search-box" :gutter="16">
        <el-form @submit.native.prevent ref="elForm" :model="dataForm" :rules="rules">
          
          <el-col :span="16">
            <el-form-item label="审核内容" prop="FNOTE">
              <el-input
                type="textarea"
                :rows="3"
                placeholder="请输入内容"
                v-model="textarea3">
              </el-input>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="审核结果">
              <el-select v-model="dataForm.FBILLSTATE" placeholder="请选择">
                <el-option
                  v-for="item in options1"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
        
         </el-form>
        </el-row>
      </el-card>
    </el-timeline-item>

  </el-timeline>

</div>

  </el-dialog>
</template>
<script>
  import jnpf from "@/utils/jnpf"
  export default {
    components: {  },
    props: {
      formationlist: {
        type: Array,
        default: [],
      },
    },
    data() {
      return {
        textarea1: '新版饲料标准GB 13078于2018年5月1日实施,该标+A2:F36准以保障饲料安全、环境安全和养殖动物健康为基本宗旨, 坚持源头控制和产品控制相结合，对风险较大的有毒有害物质（包括无机污染物，真菌毒素，天然毒素，有机氯污染物，微生物污染物）,设置了限量值，是饲料企业衡量和控制产品质量安全水平的重要尺度。复达检测集团可以提供饲料原料，饲料产品检测服务，帮助企业控制生产各个环节的风险。',
        textarea2: '报告准确已核对，核对人 戚继光，核对时间 2024-12-19 17:04:21',
        textarea3: '报告内容已审核，审核人 吴大猷，审核时间 2024-12-20 10:04:21',
        value1: new Date(2024, 12, 2, 12, 0),

        title: "核对",
        insertorupdate: true,
        dataForm: {
            fbillno:"H2412160005",
            forddate:"2024-12-16",
            forduser:"上海全是肉供应链管理有限公司",
            frecuser:"曹操",
            fcatno:"24121500001",
            fcatname:"实验猪配合饲料",
            fsrcno:"P2412160005",
            fpiececount:20,
            ftotalamt:5900.00,
            fbillstate:"登记中",
            freportuser:"HIS20240923.pdf",
        },
        rules: {
          FUSERNUMBER:[
            { required: true, message: '请输入学籍号码', trigger: 'blur' },
          ],
          FUSER: [
            { required: true, message: '请输入申请人员', trigger: 'blur' },
          ],
          FMEMO: [
            { required: true, message: '请输入申请理由', trigger: 'blur' },
          ],
        },
        list1:[{  "FENTRYID":1,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500001",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:30:42",
                "FMEMO":"L202412160023.pdf"
              },
              { "FENTRYID":2,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500002",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:35:42",
                "FMEMO":"L202412160053.pdf"
              },
              { "FENTRYID":3,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500003",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:40:42",
                "FMEMO":"L202412160123.pdf"
              }],
         list2:[
              { "FENTRYID":1,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500004",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:45:42",
                "FMEMO":"L202412160153.pdf"
              },
              { "FENTRYID":2,
                "FCATNO": "100001",
                "FCATNAME": "实验猪配合饲料",
                "FNUM":"24121500005",
                "FUSER":"曹植",
                "FDATE":"2024-12-16 09:50:42",
                "FMEMO":"L2024121602093.pdf"
              }],
        list3: [{ "FENTRYID":1,
                  "FWORKNAME": "危化品A",
                  "FCAS": "94-2-3",
                  "FQTY":500,
                  "FUNIT":"ml",
                  "FMEMO": ""
                },
                { "FENTRYID":2,
                  "FWORKNAME": "危化品A",
                  "FCAS": "94-2-3",
                  "FQTY":500,
                  "FUNIT":"ml",
                  "FMEMO": ""
                }],
        list5: [{ "FENTRYID":1,
                  "FWORKNO": "1002",
                  "FWORKNAME": "曹洪",
                  "FUFWORKFLAGNIT":"操作手",
                  "FMEMO": ""
                },
                { "FENTRYID":2,
                  "FWORKNO": "1003",
                  "FWORKNAME": "曹丕",
                  "FUFWORKFLAGNIT":"操作手",
                  "FMEMO": ""
                }],
        loading: false,
        visible: false,

        //所属校区选择数据
        options1: [{
          value: '1',
          label: '申请中'
        }, {
          value: '2',
          label: '已通过'
        }, {
          value: '3',
          label: '已驳回'
        }],

        //所属校区选择数据
        options2: [{
          value: '1',
          label: '本院人员'
        }, {
          value: '2',
          label: '培训人员'
        }, {
          value: '3',
          label: '外来人员'
        }],
        
      };
    },
    created() {
    },
    mounted() { },
    methods: {
      //
      init(FBILLNO) {
        this.dataForm.FBILLNO = FBILLNO;
        if (this.dataForm.FBILLNO) {
          this.title = "修改"
          this.insertorupdate = false;
        }
        else {
          this.title = "审核"
          this.dataForm.FBILLNO = "K" + Math.floor(Math.random() * 10000000) + 1;
          this.insertorupdate = true;
        }
        this.visible = true;
      },
      shoplist(data) {
        data.forEach(item => {
          this.list.push({
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "1"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "曹操"
          },{
            FBILLNO: this.dataForm.FBILLNO
            , FENTRYID: "2"
            , FYEAR: 2024
            , FGRADE: "大一"
            , FCLASS: "化学系1班"
            , FSTUDNAME: "刘备"
          })
        });
      },
      //
      cancel() {
        this.list = [];
        this.visible = false;
      },
    },
  };
</script>